<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    parent

    <script>
      const socket = new WebSocket('ws://127.0.0.1:5500/code/children.html')
      // const socket = new WebSocket('wss://echo.websocket.org')
      // Connection opened
      socket.addEventListener('open', function (event) {
        socket.send('Hello Server!')
      })
      socket.send('Hello cccccccc!')

      // Listen for messages
      socket.addEventListener('message', function (event) {
        console.log('Message from server ', event.data)
      })
    </script>
  </body>
</html>
